﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConfigFileProcessor
{
    class Program
    {
        static void Main(string[] args)
        {
            //读取文件
            using (StreamReader sr = new StreamReader("config.txt"))
            {
                using (FileStream fs = new FileStream("config_out.txt", FileMode.Create))
                {
                    StreamWriter sw = new StreamWriter(fs);
                    string str = string.Empty;

                    string line = sr.ReadLine();
                    while (!string.IsNullOrEmpty(line))
                    {
                        //string content_Aes = line;
                        string content_Aes = Convert.ToBase64String(System.Text.UTF8Encoding.UTF8.GetBytes(line));
                        //string content_Aes = AESEncryption.EncryptAES(line, "dave", "77studio");
                        sw.WriteLine(content_Aes);
                        line = sr.ReadLine();
                    }
                    sw.Flush();
                    sw.Close();
                }

            }
        }
    }
}
